package com.gopay.common.domain.cps.vo;

import com.gopay.common.constants.cps.RefundFlag;
import com.gopay.common.domain.cps.CpsGenMainOrder;
import com.gopay.common.domain.cps.CpsGenPayOrder;

import java.math.BigDecimal;
import java.util.Date;

/**
 * 
 * 付款类订单
 * 
 * @FullCpsGenPayOrder.java
 * @author MA HUAN
 * @2013-1-7 下午5:32:40 www.gopay.com.cn Inc.All rights reserved.
 */
public class FullCpsGenPayOrder  extends CpsGenOrder{

    private static final long serialVersionUID = -4426652441534358602L;

    //子表属性
    private String merOrderSq;
    private BigDecimal totalRefundFeeAmt;
    private BigDecimal totalRefundAmt;
    private BigDecimal orderBankFeeAmt;
    private RefundFlag isRefund;
    private String recvPbocBankCode;
    private String recvBankName;
    private String recvBankBranchName;
    private String recvBankAcctName;
    private String recvBankAcctNum;
    private String recvBankProvinceCode;
    private String recvBankProvinceName;
    private String recvBankCityCode;
    private String recvBankCityName;
    private String recvBankPbocNum;
    private String bcFlag;
    private String gopayBankOrderno;
    private String lastUpdTrancode;
    private String subRemark1;
    private String subRemark2;
    private String recvMobile;
    
    private int settlementCycle;
    private Date settlementTs;
    private Date custAuditTime;
    private String splitFlag;
    
    /**
     * 是否T+1优化
     */
    private Integer isOptimizingSettle;
    
    /**
     * 结算周期类型 00- T+N 第n个交易日结算;01- D+N 每日结算
     */
    private String settlementType;
    /**
     * 结算状态 0 非优化1申请中 2 优化失败 3 优化成功
     */
    private Integer settlementState;
    /**
     * 真实结算操作类型 01 手工，02 实时，03 自动
     */
    private String realSettlementOperationType;

    private String autoSettle;

    /**
     * 转手动结算原因
     */
    private String manualReason;
    /**
     *账户类型
     */
    private String acctType;
    
    public FullCpsGenPayOrder(){
         
    }
    public FullCpsGenPayOrder(CpsGenMainOrder main,CpsGenPayOrder pay){
        setGopayOrderId(main.getGopayOrderId());
        setTransDtlSq(main.getTransDtlSq());
        setGopayIntTxnCd(main.getGopayIntTxnCd());
        setMerId(main.getMerId());
        setMerOrderId(main.getMerOrderId());
        setMerTxnTm(main.getMerTxnTm());
        setGatewaySource(main.getGatewaySource());
        setGatewayChannel(main.getGatewayChannel());
        setOrderType(main.getOrderType());
        setPayChannel(main.getPayChannel());
        setGopayTxnTm(main.getGopayTxnTm());
        setRelevanceGopayOrderId(main.getRelevanceGopayOrderId());
        setTotalOrderAmt(main.getTotalOrderAmt());
        setTotalOrderFeeAmt(main.getTotalOrderFeeAmt());
        setOrderDealAmt(main.getOrderDealAmt());
        setOrderRealFeeAmt(main.getOrderRealFeeAmt());
        setOrderFeePayer(main.getOrderFeePayer());
        setCurType(main.getCurType());
        setMainRecvAcct(main.getMainRecvAcct());
        setMainRecvAcctProdCode(main.getMainRecvAcctProdCode());
        setMainRecvAcctProdName(main.getMainRecvAcctProdName());
        setMainRecvCustId(main.getMainRecvCustId());
        setPayAcct(main.getPayAcct());
        setMainPayAcctProdCode(main.getMainPayAcctProdCode());
        setMainPayAcctProdName(main.getMainPayAcctProdName());
        setPayCustId(main.getPayCustId());
        setTxnStaCd(main.getTxnStaCd());
        setOutStlmId(main.getOutStlmId());
        setOutPayAcct(main.getOutPayAcct());
        setTranFinishTime(main.getTranFinishTime());
        setOrderStlmTime(main.getOrderStlmTime());
        setLastUpdTrancode(main.getLastUpdTrancode());
        setRemark1(main.getRemark1());
        setRemark2(main.getRemark2());
        setRemark3(main.getRemark3());
        setMainCreatedTs(main.getCreatedTs());
        setMainLastUpdTs(main.getLastUpdTs());
        setReversalFlag(main.getReversalFlag());
        //商户交易金额
        setMerTxnAmt(main.getMerTxnAmt());
       
        setAccountPoint(main.getAccountPoint());
        
        //系统加固   结算金额  zhg.zhang 20160712 
        setSettleAmt(main.getSettleAmt());
        //子交易类型 add by zhoupeng 20170825
        setChildTranType(main.getChildTranType());
        setOtherAcct(main.getOtherAcct());
        this.merOrderSq = pay.getMerOrderSq();
        this.totalRefundFeeAmt = pay.getTotalRefundFeeAmt();
        this.totalRefundAmt = pay.getTotalRefundAmt();
        this.orderBankFeeAmt = pay.getOrderBankFeeAmt();
        this.isRefund = pay.getIsRefund();
        this.recvPbocBankCode = pay.getRecvPbocBankCode();
        this.recvBankName = pay.getRecvBankName();
        this.recvBankBranchName = pay.getRecvBankBranchName();
        this.recvBankAcctName = pay.getRecvBankAcctName();
        this.recvBankAcctNum = pay.getRecvBankAcctNum();
        this.recvBankProvinceCode = pay.getRecvBankProvinceCode();
        this.recvBankProvinceName = pay.getRecvBankProvinceName();
        this.recvBankCityCode = pay.getRecvBankCityCode();
        this.recvBankCityName = pay.getRecvBankCityName();
        this.recvBankPbocNum = pay.getRecvBankPbocNum();
        this.bcFlag = pay.getBcFlag();
        this.gopayBankOrderno = pay.getGopayBankOrderno();
        this.lastUpdTrancode = pay.getLastUpdTrancode();
        this.subRemark1 = pay.getRemark1();
        this.subRemark2 = pay.getRemark2();
        this.settlementCycle = pay.getSettlementCycle();
        this.settlementTs = pay.getSettlementTs();
        this.custAuditTime = pay.getCustAuditTime();
        this.isOptimizingSettle = pay.getIsOptimizingSettle();
        this.splitFlag = pay.getSplitFlag();
        this.recvMobile = pay.getRecvMobile();
        this.autoSettle = pay.getAutoSettle();
        this.settlementState = pay.getSettlementState();
        this.settlementType = pay.getSettlementType();
        this.realSettlementOperationType = pay.getRealSettlementOperationType();
        this.manualReason = pay.getManualReason();
        this.acctType = pay.getAcctType();
    }
    
    public CpsGenMainOrder getCpsGenMainOrder() {
        CpsGenMainOrder main = new CpsGenMainOrder();
        main.setGopayOrderId(getGopayOrderId());
        main.setTransDtlSq(getTransDtlSq());
        main.setGopayIntTxnCd(getGopayIntTxnCd());
        main.setMerId(getMerId());
        main.setMerOrderId(getMerOrderId());
        main.setMerTxnTm(getMerTxnTm());
        main.setGatewaySource(getGatewaySource());
        main.setGatewayChannel(getGatewayChannel());
        main.setOrderType(getOrderType());
        main.setPayChannel(getPayChannel());
        main.setGopayTxnTm(getGopayTxnTm());
        main.setRelevanceGopayOrderId(getRelevanceGopayOrderId());
        main.setTotalOrderAmt(getTotalOrderAmt());
        main.setTotalOrderFeeAmt(getTotalOrderFeeAmt());
        main.setOrderDealAmt(getOrderDealAmt());
        main.setOrderRealFeeAmt(getOrderRealFeeAmt());
        main.setOrderFeePayer(getOrderFeePayer());
        main.setCurType(getCurType());
        main.setMainRecvAcct(getMainRecvAcct());
        main.setMainRecvAcctProdCode(getMainRecvAcctProdCode());
        main.setMainRecvAcctProdName(getMainRecvAcctProdName());
        main.setMainRecvCustId(getMainRecvCustId());
        main.setPayAcct(getPayAcct());
        main.setMainPayAcctProdCode(getMainPayAcctProdCode());
        main.setMainPayAcctProdName(getMainPayAcctProdName());
        main.setPayCustId(getPayCustId());
        main.setTxnStaCd(getTxnStaCd());
        main.setOutStlmId(getOutStlmId());
        main.setOutPayAcct(getOutPayAcct());
        main.setTranFinishTime(getTranFinishTime());
        main.setOrderStlmTime(getOrderStlmTime());
        main.setCreatedTs(getMainCreatedTs());
        main.setLastUpdTs(getMainLastUpdTs());
        main.setLastUpdTrancode(getLastUpdTrancode());
        main.setRemark1(getRemark1());
        main.setRemark2(getRemark2());
        main.setRemark3(getRemark3());
        main.setReversalFlag(getReversalFlag());
        //商户交易金额
        main.setMerTxnAmt(getMerTxnAmt());
        //记账点
        main.setAccountPoint(this.getAccountPoint());
        //系统加固   结算金额  zhg.zhang 20160712 
        main.setSettleAmt(getSettleAmt());
        //子交易类型 add by zhoupeng 20170825
        main.setChildTranType(getChildTranType());
        main.setOtherAcct(getOtherAcct());
        return main;
    }
    
    public CpsGenPayOrder getCpsGenPayOrder(){
        CpsGenPayOrder pay = new CpsGenPayOrder();
        pay.setGopayOrderId(getGopayOrderId());
        pay.setMerOrderSq(merOrderSq);
        pay.setTotalRefundFeeAmt(totalRefundFeeAmt);
        pay.setTotalRefundAmt(totalRefundAmt);
        pay.setOrderBankFeeAmt(orderBankFeeAmt);
        pay.setIsRefund(isRefund);
        pay.setRecvPbocBankCode(recvPbocBankCode);
        pay.setRecvBankName(recvBankName);
        pay.setRecvBankBranchName(recvBankBranchName);
        pay.setRecvBankAcctName(recvBankAcctName);
        pay.setRecvBankAcctNum(recvBankAcctNum);
        pay.setRecvBankProvinceCode(recvBankProvinceCode);
        pay.setRecvBankProvinceName(recvBankProvinceName);
        pay.setRecvBankCityCode(recvBankCityCode);
        pay.setRecvBankCityName(recvBankCityName);
        pay.setRecvBankPbocNum(recvBankPbocNum);
        pay.setBcFlag(bcFlag);
        pay.setGopayBankOrderno(gopayBankOrderno);
        pay.setCreatedTs(getMainCreatedTs());
        pay.setLastUpdTs(getMainLastUpdTs());
        pay.setLastUpdTrancode(lastUpdTrancode);
        pay.setRemark1(subRemark1);
        pay.setRemark2(subRemark2);
        pay.setSettlementCycle(settlementCycle);
        pay.setSettlementTs(settlementTs);
        pay.setCustAuditTime(custAuditTime);
        pay.setIsOptimizingSettle(isOptimizingSettle);
        pay.setSplitFlag(splitFlag);
        pay.setRecvMobile(recvMobile);
        pay.setAutoSettle(autoSettle);
        pay.setSettlementState(settlementState);
        pay.setSettlementType(settlementType);
        pay.setRealSettlementOperationType(realSettlementOperationType);
        pay.setManualReason(manualReason);
        pay.setAcctType(acctType);
        return pay;
    }
   
    public String getMerOrderSq() {
        return merOrderSq;
    }
    public void setMerOrderSq(String merOrderSq) {
        this.merOrderSq = merOrderSq;
    }
    public BigDecimal getTotalRefundFeeAmt() {
        return totalRefundFeeAmt;
    }
    public void setTotalRefundFeeAmt(BigDecimal totalRefundFeeAmt) {
        this.totalRefundFeeAmt = totalRefundFeeAmt;
    }
    public BigDecimal getTotalRefundAmt() {
        return totalRefundAmt;
    }
    public void setTotalRefundAmt(BigDecimal totalRefundAmt) {
        this.totalRefundAmt = totalRefundAmt;
    }
    public BigDecimal getOrderBankFeeAmt() {
        return orderBankFeeAmt;
    }
    public void setOrderBankFeeAmt(BigDecimal orderBankFeeAmt) {
        this.orderBankFeeAmt = orderBankFeeAmt;
    }
    public RefundFlag getIsRefund() {
        return isRefund;
    }
    public void setIsRefund(RefundFlag isRefund) {
        this.isRefund = isRefund;
    }
    public String getRecvBankCode() {
        return recvPbocBankCode;
    }
    public void setRecvBankCode(String recvBankCode) {
        this.recvPbocBankCode = recvBankCode;
    }
    public String getRecvBankName() {
        return recvBankName;
    }
    public void setRecvBankName(String recvBankName) {
        this.recvBankName = recvBankName;
    }
    public String getRecvBankBranchName() {
        return recvBankBranchName;
    }
    public void setRecvBankBranchName(String recvBankBranchName) {
        this.recvBankBranchName = recvBankBranchName;
    }
    public String getRecvBankAcctName() {
        return recvBankAcctName;
    }
    public void setRecvBankAcctName(String recvBankAcctName) {
        this.recvBankAcctName = recvBankAcctName;
    }
    public String getRecvBankAcctNum() {
        return recvBankAcctNum;
    }
    public void setRecvBankAcctNum(String recvBankAcctNum) {
        this.recvBankAcctNum = recvBankAcctNum;
    }
    public String getRecvBankProvinceCode() {
        return recvBankProvinceCode;
    }
    public void setRecvBankProvinceCode(String recvBankProvinceCode) {
        this.recvBankProvinceCode = recvBankProvinceCode;
    }
    public String getRecvBankProvinceName() {
        return recvBankProvinceName;
    }
    public void setRecvBankProvinceName(String recvBankProvinceName) {
        this.recvBankProvinceName = recvBankProvinceName;
    }
    public String getRecvBankCityCode() {
        return recvBankCityCode;
    }
    public void setRecvBankCityCode(String recvBankCityCode) {
        this.recvBankCityCode = recvBankCityCode;
    }
    public String getRecvBankCityName() {
        return recvBankCityName;
    }
    public void setRecvBankCityName(String recvBankCityName) {
        this.recvBankCityName = recvBankCityName;
    }
    public String getRecvBankPbocNum() {
        return recvBankPbocNum;
    }
    public void setRecvBankPbocNum(String recvBankPbocNum) {
        this.recvBankPbocNum = recvBankPbocNum;
    }
    public String getBcFlag() {
        return bcFlag;
    }
    public void setBcFlag(String bcFlag) {
        this.bcFlag = bcFlag;
    }
    public String getGopayBankOrderno() {
        return gopayBankOrderno;
    }
    public void setGopayBankOrderno(String gopayBankOrderno) {
        this.gopayBankOrderno = gopayBankOrderno;
    }
    public String getLastUpdTrancode() {
        return lastUpdTrancode;
    }
    public void setLastUpdTrancode(String lastUpdTrancode) {
        this.lastUpdTrancode = lastUpdTrancode;
    }
    public String getSubRemark1() {
        return subRemark1;
    }
    public void setSubRemark1(String subRemark1) {
        this.subRemark1 = subRemark1;
    }
    public String getSubRemark2() {
        return subRemark2;
    }
    public void setSubRemark2(String subRemark2) {
        this.subRemark2 = subRemark2;
    }
    public String getRecvMobile() {
        return recvMobile;
    }
    public void setRecvMobile(String recvMobile) {
        this.recvMobile = recvMobile;
    }
    public int getSettlementCycle() {
        return settlementCycle;
    }
    public void setSettlementCycle(int settlementCycle) {
        this.settlementCycle = settlementCycle;
    }
    public Date getSettlementTs() {
        return settlementTs;
    }
    public void setSettlementTs(Date settlementTs) {
        this.settlementTs = settlementTs;
    }

    public Date getCustAuditTime() {
        return custAuditTime;
    }

    public void setCustAuditTime(Date custAuditTime) {
        this.custAuditTime = custAuditTime;
    }
	public Integer getIsOptimizingSettle() {
		return isOptimizingSettle;
	}
	public void setIsOptimizingSettle(Integer isOptimizingSettle) {
		this.isOptimizingSettle = isOptimizingSettle;
	}

	public String getSplitFlag() {
		return splitFlag;
	}
	public void setSplitFlag(String splitFlag) {
		this.splitFlag = splitFlag;
	}

    public String getAutoSettle() {
        return autoSettle;
    }

    public void setAutoSettle(String autoSettle) {
        this.autoSettle = autoSettle;
    }
    
	public String getSettlementType() {
		return settlementType;
	}
	
	public void setSettlementType(String settlementType) {
		this.settlementType = settlementType;
	}
	
	public Integer getSettlementState() {
		return settlementState;
	}
	
	public void setSettlementState(Integer settlementState) {
		this.settlementState = settlementState;
	}
	
	public String getRealSettlementOperationType() {
		return realSettlementOperationType;
	}
	
	public void setRealSettlementOperationType(String realSettlementOperationType) {
		this.realSettlementOperationType = realSettlementOperationType;
	}

    public String getManualReason() {
        return manualReason;
    }

    public void setManualReason(String manualReason) {
        this.manualReason = manualReason;
    }

    public String getAcctType() {
        return acctType;
    }

    public void setAcctType(String acctType) {
        this.acctType = acctType;
    }
}